]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
windowManager: Only allow top-drag gesture if focus window is fullscreen
authorJonas Dreßler <verdre@v0yd.nl>
Sat, 9 Feb 2019 22:40:02 +0000 (23:40 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Sun, 10 Feb 2019 09:06:11 +0000 (10:06 +0100)
The top drag gesture is not of any use if the topmost window is not
a fullscreen window and will only block events near the important top
screen edge (i.e. the panel). To fix this, only enable this gesture if
the focus window is a fullscreen window.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/552

js/ui/windowManager.js

index 98bed26f219adf9635459bba55049e1e130e6733..ea9493d6fc1af88ef133ba2017fdf40cc208253c 100644 (file)
@@ -1076,6 +1076,15 @@ var WindowManager = class {
             if (currentWindow)
                 currentWindow.unmake_fullscreen();
         });
+
+        let updateUnfullscreenGesture = () => {
+            let currentWindow = global.display.focus_window;
+            gesture.enabled = currentWindow && currentWindow.is_fullscreen();
+        }
+
+        global.display.connect('notify::focus-window', updateUnfullscreenGesture);
+        global.display.connect('in-fullscreen-changed', updateUnfullscreenGesture);
+
         global.stage.add_action(gesture);
     }